Continued fraction factorization